using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;

public class AppViewCtrl : MonoBehaviour
{
    public MeasureUI measureUI;
    [FormerlySerializedAs("measureController")] public MeasureScene measureScene;
    public BodyResultUI bodyResultUI;

    // Start is called before the first frame update
    void Start()
    {
        ShowMeasureMainUI();
    }

    public void ShowMeasureMainUI()
    {   
        measureUI.gameObject.SetActive(true);
        measureScene.gameObject.SetActive(false);
        bodyResultUI.gameObject.SetActive(false);
    }

    public void ShowMeasureScene()
    {
        measureUI.gameObject.SetActive(false);
        measureScene.gameObject.SetActive(true);
        measureScene.Begin();
        bodyResultUI.gameObject.SetActive(false);
    }
    public void ShowBodyResultUI(BodyReportData data,Sprite debugView1,Sprite debugView2)
    {
        bodyResultUI.Init(data);
        bodyResultUI.debugView1.sprite = debugView1;
        bodyResultUI.debugView2.sprite = debugView2;
        measureUI.gameObject.SetActive(false);
        measureScene.gameObject.SetActive(false);
        bodyResultUI.gameObject.SetActive(true);
    }
    public void ShowErrorMag(Sprite debugView1,Sprite debugView2)
    {
        bodyResultUI.ShowErrorMsg();
        bodyResultUI.debugView1.sprite = debugView1;
        bodyResultUI.debugView2.sprite = debugView2;
        measureUI.gameObject.SetActive(false);
        measureScene.gameObject.SetActive(false);
        bodyResultUI.gameObject.SetActive(true);
    }

    // Update is called once per frame
    void Update()
    {
        
    }

}
